package com.Main.faislamovers;
import java.util.List;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.widget.ZoomControls;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;

public class TermainlMapISB extends MapActivity {
	
    private static final double latitudeE6 = 33.66244;
    private static final double longitudeE6 = 73.08286;
    MapView mapView;
    ZoomControls zoomControls;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.termainlsmaps);
		
		  mapView = (MapView) findViewById(R.id.themap);
		  //mapView.setBuiltInZoomControls(true);

		  final MapController mapController = mapView.getController();
			
		  zoomControls = (ZoomControls) findViewById(R.id.zoomcontrols);
		  zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					mapController.zoomIn();
				}
			});
			zoomControls.setOnZoomOutClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					mapController.zoomOut();
				}
			});
		  
		  
		  
	        List mapOverlays = mapView.getOverlays();
	        Drawable drawable = this.getResources().getDrawable(R.drawable.map_pin_hi_2);
	        CustomItemizedOverlay itemizedOverlay = 
	         new CustomItemizedOverlay(drawable, this);
         
	        
	        
	        GeoPoint point = new GeoPoint((int) ( (latitudeE6) * 1E6),(int) ((longitudeE6) *1E6));
	        OverlayItem overlayitem = 
	             new OverlayItem(point, "Hello", "I'm in Athens, Greece!");

	        itemizedOverlay.addOverlay(overlayitem);
	        mapOverlays.add(itemizedOverlay);

	     //   MapController mapController = mapView.getController();

	        mapController.animateTo(point);
	        //mapController.setZoom(18);

	    }

	    @Override
	    protected boolean isRouteDisplayed() {
	        return false;
	    }

	}